package com.qf.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Description: 公用常量
 * @Data: 2022/9/9 7:59
 * @Pacakge: com.qf.config
 * @ClassName: DruidConfig
 * @Author: fan
 */
@Component
//@ConfigurationProperties(prefix = "jdbc")
//读取配置文件中的属性
//属性值要与配置文件中的名称一致, 属性文件中的key:前缀+属性名称
public class DruidConfig {
    private String driverClassName;
    private String url;
    private String user;
    private String password;

    public DruidConfig() {
    }

    public DruidConfig(String driverClassName, String url, String user, String password) {
        this.driverClassName = driverClassName;
        this.url = url;
        this.user = user;
        this.password = password;
    }

    public String getDriverClassName() {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName) {
        this.driverClassName = driverClassName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
